# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/11/8
# @File : 226.B - Counting Arrays.py
# 利用set的元素唯一性。

n = int(input())

arr = []

for i in range(n):
    arr.append(str(list(map(int,input().split()))))

cnt = n

s = set(arr)

print(len(s))

"""
超时做法。
"""

# r = [0]*n
# for i in range(n):
#     if r[i]==1 :continue
#     for j in range(i+1,n):
#         if(arr[i][0]==arr[j][0]):
#             tag = 0
#             for k in range(1,arr[i][0]+1):
#                 if(arr[i][k]!=arr[j][k]):
#                     tag = 1
#                     break
#             if(tag==0):
#                 cnt -= 1
#                 r[j] = 1